package com.base;

public class BaseController {


    public ResultInfo success() {
        return new ResultInfo(Status.SUCCESS);
    }


    public ResultInfo success(Status status) {
        return new ResultInfo(status);
    }


    public ResultInfo success(Object result) {
        return new ResultInfo().result(result);
    }

    public ResultInfo error(Status status) {
        return new ResultInfo(status);
    }

    public ResultInfo error(Integer status, String message) {
        return new ResultInfo(status, message);
    }

    public ResultInfo error(Status status, String message) {
        return new ResultInfo(status.code, message);
    }

    public ResultInfo error() {
        return new ResultInfo(Status.SYSTEM_ERROR);
    }


}
